Skip to content

Conversation

@biswajit-sarkar-007
Copy link

issue #20

in this pr try to add Restart button

2025-10-16.22-03-18.remuxed.mp4

Comment on lines +207 to +211
// Reset timer text to full duration in mm:ss
const totalSeconds = settings.durationInSeconds;
const minutes = Math.floor(totalSeconds / 60).toString().padStart(2, "0");
const seconds = (totalSeconds % 60).toString().padStart(2, "0");
timer.textContent = `${minutes}:${seconds}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already is a method

Suggested change
// Reset timer text to full duration in mm:ss
const totalSeconds = settings.durationInSeconds;
const minutes = Math.floor(totalSeconds / 60).toString().padStart(2, "0");
const seconds = (totalSeconds % 60).toString().padStart(2, "0");
timer.textContent = `${minutes}:${seconds}`;
updateTimer(settings.durationInSeconds);

@aceol
Copy link
Contributor

aceol commented Oct 24, 2025

Not sure to understand the requestAnimationFrame, it's simple animation which can be managed simply by css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants